import React,{useEffect,useState} from 'react'
import styles from '../css分支/Money.module.css'
import { Arrow, ChatO, Circle } from '@react-vant/icons';
import { Grid, Image } from 'react-vant'
import { useNavigate } from 'react-router-dom'
import { ArrowLeft, BalanceO } from '@react-vant/icons';
import { AnimatingNumbers } from '@nutui/nutui-react'
import {  Cell } from '@nutui/nutui-react'
import axios from 'axios';
export default function Money() {
    const navigate = useNavigate()
    const [list,setlist] = useState({})
    const getlist= async()=>{
      let res = await axios.get('http://localhost:3000/xzx/business')
      setlist(res.data.data)
    //   setValue(res.data.data.gonggao)
    }
    useEffect(()=>{
      getlist()
      
    },[])
    return (
        <div className={styles.main}>
            <div className={styles.heads}>
                <div className={styles.head}>
                    <ArrowLeft style={{ marginLeft: '0.2rem' }} onClick={() => { navigate('/shou/main') }} />
                    <p style={{ fontSize: '0.22rem' }}>财务管理</p>
                    <p style={{ marginRight: '0.1rem' }}></p>
                </div>
                <div className={styles.head2}>
                    <p>账户余额</p>
                    <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
                        <p> </p>
                        <p style={{ fontSize: '0.4rem' }}>￥{list.total}</p>
                        {/* <Cell title={<AnimatingNumbers.CountUp value="678.94" />} style={{backgroundColor:'rgb(245, 112, 88)',border:'none',margin:'0 auto',borderRadius:'0rem'}}/> */}
                        <span onClick={()=>{navigate('/detail')}}>明细&nbsp;&nbsp;&nbsp;</span>
                    </div>
                </div>
            </div>
            <div className={styles.body1}>
                <div className={styles.body_fen} onClick={() => { }}>
                    <img src="/imgs/money.png" alt="" style={{ width: '0.55rem', marginTop: '0.2rem' }} />
                    <p>&nbsp;&nbsp;提现</p>
                </div>
                <div className={styles.body_fen} onClick={() => { navigate('/chongzhi') }}>
                    <img src="/imgs/money2.png" alt="" style={{ width: '0.55rem', marginTop: '0.18rem' }} />
                    <p>&nbsp;&nbsp;充值</p>
                </div>
                <div className={styles.body_fen} onClick={() => {  }}>
                    <img src="/imgs/money3.png" alt="" style={{ width: '0.55rem', marginTop: '0.16rem' }} />
                    <p>&nbsp;银行卡</p>
                </div>
            </div>
            <div className={styles.body2}>
                <p>&nbsp;&nbsp;&nbsp;待入账总额</p>
                <p>407.56&nbsp;&nbsp;&nbsp;</p>
            </div>
            <div className={styles.body3}>
                <div className={styles.body3_fen}>
                    <BalanceO style={{ fontSize: '0.5rem' }} />
                    <div style={{marginRight:'1.5rem'}}>
                        <p>共101单</p>
                        <p style={{fontSize:'0.14rem',}}>2024-2-17</p>
                    </div>
                    <div style={{marginRight:'0.15rem'}}>
                        <p>407.56</p>
                        
                        <p style={{fontSize:'0.14rem',color:'red'}}>未入账</p>
                    </div>
                </div>
                <div className={styles.body3_fen}>
                    <BalanceO style={{ fontSize: '0.5rem' }} />
                    <div style={{marginRight:'1.5rem'}}>
                        <p>共101单</p>
                        <p style={{fontSize:'0.14rem',}}>2024-2-17</p>
                    </div>
                    <div style={{marginRight:'0.15rem'}}>
                        <p>407.56</p>
                        <p style={{fontSize:'0.14rem'}}>已入账</p>
                    </div>
                </div>
                <div className={styles.body3_fen}>
                    <BalanceO style={{ fontSize: '0.5rem' }} />
                    <div style={{marginRight:'1.5rem'}}>
                        <p>共101单</p>
                        <p style={{fontSize:'0.14rem',}}>2024-2-17</p>
                    </div>
                    <div style={{marginRight:'0.15rem'}}>
                        <p>407.56</p>
                        <p style={{fontSize:'0.14rem'}}>已入账</p>
                    </div>
                </div>
                <div className={styles.body3_fen}>
                    <BalanceO style={{ fontSize: '0.5rem' }} />
                    <div style={{marginRight:'1.5rem'}}>
                        <p>共101单</p>
                        <p style={{fontSize:'0.14rem',}}>2024-2-17</p>
                    </div>
                    <div style={{marginRight:'0.15rem'}}>
                        <p>407.56</p>
                        <p style={{fontSize:'0.14rem'}}>已入账</p>
                    </div>
                </div>
                <div className={styles.body3_fen}>
                    <BalanceO style={{ fontSize: '0.5rem' }} />
                    <div style={{marginRight:'1.5rem'}}>
                        <p>共101单</p>
                        <p style={{fontSize:'0.14rem',}}>2024-2-17</p>
                    </div>
                    <div style={{marginRight:'0.15rem'}}>
                        <p>407.56</p>
                        <p style={{fontSize:'0.14rem'}}>已入账</p>
                    </div>
                </div>
                <div className={styles.body3_fen}>
                    <BalanceO style={{ fontSize: '0.5rem' }} />
                    <div style={{marginRight:'1.5rem'}}>
                        <p>共101单</p>
                        <p style={{fontSize:'0.14rem',}}>2024-2-17</p>
                    </div>
                    <div style={{marginRight:'0.15rem'}}>
                        <p>407.56</p>
                        <p style={{fontSize:'0.14rem'}}>已入账</p>
                    </div>
                    
                </div>
            </div>
        </div>
    )
}
